package com.art.sunflower.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.util.Date;

@Data
public class News {
    private int id;
    private String url;
    private String title;
    private String info;
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date date;
    private String author;
    private String content;

    public News() {
    }

    public News(String url, String title, String info, Date date, String author, String content) {
        this.url = url;
        this.title = title;
        this.info = info;
        this.date = date;
        this.author = author;
        this.content = content;
    }

    public News(String title, String info, Date date, String author, String content) {
        this.title = title;
        this.info = info;
        this.date = date;
        this.author = author;
        this.content = content;
    }


}



